package com.bear.cmcc.NetTestHTTP.ui.view;


import com.bear.cmcc.NetTestHTTP.R;

import android.app.ProgressDialog;
import android.content.Context;
import android.view.MotionEvent;

/**
 * 加载框
 * @author meizhen.xu
 *
 */
public class LoadingDialog extends ProgressDialog {
	private Context context;

	public LoadingDialog(Context context, int theme) {
		super(context, theme);
		this.context = context;
		init();
	}
	
	public LoadingDialog(Context context) {
		super(context);
		this.context = context;
		init();		
	}

	private void init() {
		this.setMessage(context.getString(R.string.pleaseWait));
		this.setProgressStyle(ProgressDialog.STYLE_SPINNER);
		this.setCancelable(true);
	}

	@Override
	public boolean onTouchEvent(MotionEvent event) {
		return false;
		//return super.onTouchEvent(event);
	}
	
	
	public void updateMessage(String message)
	{
	    setMessage(message);
	}

	
}
